<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>浏览待审核的App列表</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="author" content="Bluth Company">
    <link rel="shortcut icon" href="assets/ico/favicon.html">
    <link href="/myapp/Public/assets/css/bootstrap.css" rel="stylesheet">
    <link href="/myapp/Public/assets/css/theme.css" rel="stylesheet">
    <link href="/myapp/Public/assets/css/font-awesome.min.css" rel="stylesheet">
    <link href="/myapp/Public/assets/css/alertify.css" rel="stylesheet">
    <link rel="Favicon Icon" href="/myapp/Public/favicon.ico">

    <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
    <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->

</head>
<body>


<div id="wrap">
    <div class="navbar navbar-fixed-top">
        <div class="navbar-inner">
            <div class="container-fluid">
                <div class="logo">
                    <img src="/myapp/Public/assets/img/logo.png" alt="Realm Admin Template">
                </div>
                <a class="btn btn-navbar visible-phone" data-toggle="collapse" data-target=".nav-collapse">
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </a>
                <a class="btn btn-navbar slide_menu_left visible-tablet">
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </a>

                <div class="top-menu visible-desktop">

                    <ul class="pull-right">
                        <li><a href="login.html"><i class="icon-off"></i> 注销</a></li>
                    </ul>
                </div>

                <div class="top-menu visible-phone visible-tablet">
                    <ul class="pull-right">
                        <li><a title="link to View all Messages page, no popover in phone view or tablet" href="#"><i class="icon-envelope"></i></a></li>
                        <li><a title="link to View all Notifications page, no popover in phone view or tablet" href="#"><i class="icon-globe"></i></a></li>
                        <li><a href="login.html"><i class="icon-off"></i></a></li>
                    </ul>
                </div>

            </div>
        </div>
    </div>

    <div class="container-fluid">

        <!-- Side menu -->
        <div class="sidebar-nav nav-collapse collapse">
            <div class="user_side clearfix">
                <img src="/myapp/Public/assets/img/odinn.jpg" alt="Odinn god of Thunder">
                <h5>管理员</h5>
                <a href="#"><i class="icon-cog"></i> 个人设置</a>
            </div>
            <div class="accordion" id="accordion2">
                <div class="accordion-group">
                    <div class="accordion-heading">
                        <a class="accordion-toggle b_F5C294"  data-parent="#accordion2"  data-toggle="collapse" href="#collapse0"><i class="icon-user"></i> <span>用户管理</span></a>
                    </div>
                    <div id="collapse0" class="accordion-body  collapse">
                        <div class="accordion-inner">
                            <a class="accordion-toggle" href="/myapp/Admin/Index/users"><i class="icon-star"></i> 浏览用户列表</a>
                        </div>
                    </div>
                </div>
                <div class="accordion-group">
                    <div class="accordion-heading">
                        <a class="accordion-toggle b_C3F7A7" data-toggle="collapse" data-parent="#accordion2" href="#collapse1"><i class="icon-magic"></i> <span>App管理</span></a>
                    </div>
                    <div id="collapse1" class="accordion-body  collapse">
                        <div class="accordion-inner">
                            <a class="accordion-toggle" href="/myapp/Admin/Index/browseApp"><i class="icon-star"></i> 浏览App列表</a>
                            <a class="accordion-toggle" href="/myapp/Admin/Index/addApp"><i class="icon-circle"></i> 添加App</a>
                            <a class="accordion-toggle" href="/myapp/Admin/Index/checkApp"><i class="icon-list-alt"></i> 待审核App列表</a>
                        </div>
                    </div>
                </div>
                <div class="accordion-group">
                    <div class="accordion-heading">
                        <a class="accordion-toggle b_9FDDF6 collapsed" data-toggle="collapse" data-parent="#accordion2" href="#collapse2"><i class="icon-reorder"></i> <span>专题管理</span></a>
                    </div>
                    <div id="collapse2" class="accordion-body collapse">
                        <div class="accordion-inner">
                            <a class="accordion-toggle" href="/myapp/Admin/Index/browseSpecial"><i class="icon-picture"></i> 浏览专题列表</a>
                            <a class="accordion-toggle" href="/myapp/Admin/Index/CreateSpecial"><i class="icon-rss"></i> 创建专题</a>

                        </div>
                    </div>
                </div>
                <div class="accordion-group">
                    <div class="accordion-heading">
                        <a class="accordion-toggle b_9FDDF6" data-toggle="collapse" data-parent="#accordion2" href="#collapse3"><i class="icon-bullhorn"></i> <span>新闻管理</span></a>
                    </div>
                    <div id="collapse3" class="accordion-body collapse">
                        <div class="accordion-inner">
                            <a class="accordion-toggle" href="/myapp/Admin/Index/browseNews"><i class="icon-picture"></i> 浏览新闻列表</a>
                            <a class="accordion-toggle" href="/myapp/Admin/Index/addNews"><i class="icon-rss"></i> 添加新闻</a>

                        </div>
                    </div>
                </div>
                <div class="accordion-group">
                    <div class="accordion-heading">
                        <a class="accordion-toggle b_9FDDF6" data-toggle="collapse" data-parent="#accordion2" href="#collapse4"><i class="icon-tasks"></i> <span>评论管理</span></a>
                    </div>
                    <div id="collapse4" class="accordion-body collapse">
                        <div class="accordion-inner">
                            <a class="accordion-toggle" href="/myapp/Admin/Index/browseAppComment"><i class="icon-picture"></i> 浏览App评论列表</a>
                            <a class="accordion-toggle" href="/myapp/Admin/Index/browseNewsComment"><i class="icon-rss"></i> 浏览新闻评论列表</a>
                        </div>
                    </div>
                </div>


                <div class="accordion-group">
                    <div class="accordion-heading">
                        <a class="accordion-toggle b_9FDDF6" href="tickets.html"><i class=" icon-adjust"></i> <span>移动互联网大赛</span></a>
                    </div>
                </div>
            </div>
        </div>

        <!-- Main window -->
        <div class="main_container" id="tables_page">
            <div class="row-fluid">
                <br>

                <h2 class="heading">
                    App列表
                </h2>
            </div>

            <div class="row-fluid">
                <div class="widget widget-padding span12">
                    <div class="widget-header">
                        <i class="icon-group"></i>
                        <h5>所有通过审核的App</h5>

                        <div class="widget-buttons">
                            <a href="http://www.datatables.net/usage/" data-title="Documentation" class="tip" target="_blank"><i class="icon-external-link"></i></a>
                            <a href="#" data-title="Collapse" data-collapsed="false" class="tip collapse"><i class="icon-chevron-up"></i></a>
                        </div>
                    </div>
                    <div class="widget-body">
                        <table id="users" class="table table-striped table-bordered dataTable">
                            <thead>
                            <tr>
                                <th width="8%">logo</th>
                                <th>名称</th>
                                <th>开发者</th>
                                <th>上传者</th>
                                <th width="10%">上传时间</th>
                                <th width="10%">修改时间</th>
                                <th>开发技术</th>
                                <th>状态</th>
                                <th>审核信息</th>
                                <th>操作</th>

                            </tr>
                            </thead>
                            <tbody>
                            <?php if(is_array($applist)): $i = 0; $__LIST__ = $applist;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><tr>

                                    <td><img src="/myapp/Public/Uploads/photo/<?php echo ($vo["logo"]); ?>" width="60" height="60"></td>
                                    <td title="<?php echo ($vo["briefintro"]); ?>&#10;版本:<?php echo ($vo["edition"]); ?>&#10;大小:<?php echo ($vo["size"]); ?>&#10;标签:<?php echo ($vo["label"]); ?>&#10;简介：<?php echo ($vo["briefintro"]); ?>"><a href="detail/id/<?php echo ($vo["id"]); ?>"><?php echo ($vo["name"]); ?></a></td>
                                    <td><?php echo ($vo["developer"]); ?></td>
                                    <td><?php echo ($vo["upuser"]); ?></td>
                                    <td><?php echo ($vo["uptime"]); ?></td>
                                    <td><?php echo ($vo["edittime"]); ?></td>
                                    <td><?php echo ($vo["tech"]); ?></td>
                                    <td>
                                        <?php if($vo["state"] == 0): ?>待审核<?php elseif($vo["state"] == 2): ?>审核未通过<?php elseif($vo["state"] == 3): ?>禁用<?php else: ?>不详<?php endif; ?>
                                    </td>
                                    <td><?php echo ($vo["verifyinfo"]); ?></td>
                                    <td>
                                        <div class="btn-group">
                                            <a class="btn btn-small dropdown-toggle" data-toggle="dropdown" href="#">
                                                操作
                                                <span class="caret"></span>
                                            </a>
                                            <ul class="dropdown-menu pull-right">
                                                <!--禁用状态：取消禁用和删除；待审核：通过、不通过和删除；不通过：通过和删除-->
                                                <?php if($vo["state"] == 0 or $vo["state"] == 2): ?><li><a href="javascript:void(0);" rel="<?php echo ($vo["id"]); ?>"  class="jq_link"><i class="icon-ok-sign"></i>通过</a></li><?php endif; ?>
                                                <?php if($vo["state"] == 0): ?><li><a href="javascript:void(0);" rel="<?php echo ($vo["id"]); ?>"  class="jq_linkno"><i class="icon-remove-sign"></i>不通过</a></li><?php endif; ?>

                                                <?php if($vo["state"] == 3): ?><li><a href="unforbid/id/<?php echo ($vo["id"]); ?>"><i class="icon-envelope"></i>取消禁用</a></li><?php endif; ?>
                                                <li><a href="delApp/id/<?php echo ($vo["id"]); ?>" onclick="return confirm('你确定要删除吗？')"><i class="icon-remove"></i> 删除</a></li>

                                            </ul>
                                        </div>
                                    </td>

                                </tr><?php endforeach; endif; else: echo "" ;endif; ?>
                            </tbody>

                        </table>


                        <!-- 通过模态框（Modal） -->
                        <div class="modal fade" id="passModal" tabindex="-1" role="dialog"
                             aria-labelledby="myModalLabel" aria-hidden="true">
                            <div class="modal-dialog">
                                <div class="modal-content">
                                    <div class="modal-header">
                                        <button type="button" class="close"
                                                data-dismiss="modal" aria-hidden="true">
                                            &times;
                                        </button>
                                        <h4 class="modal-title" id="myModalLabel">
                                            请说明通过本App的原因。
                                        </h4>
                                    </div>
                                    <form method="post"  action="pass">
                                        <input type="hidden" id="passid" name="passid" value="">
                                        <input type="hidden" name="state" value="1">
                                        <div class="modal-body">
                                            <textarea style="width:100%;height:100%" name="verifyinfo" >审核通过。</textarea>
                                        </div>
                                        <div class="modal-footer">
                                            <button type="button" class="btn btn-default"
                                                    data-dismiss="modal">关闭
                                            </button>
                                            <button type="submit" class="btn btn-primary">
                                                提交更改
                                            </button>
                                        </div>
                                    </form>
                                </div><!-- /.modal-content -->
                            </div><!-- /.modal -->

</div>

                            <!-- 不通过模态框（Modal） -->
                            <div class="modal fade" id="nopassModal" tabindex="-1" role="dialog"
                                 aria-labelledby="myModalLabel" aria-hidden="true">
                                <div class="modal-dialog">
                                    <div class="modal-content">
                                        <div class="modal-header">
                                            <button type="button" class="close"
                                                    data-dismiss="modal" aria-hidden="true">
                                                &times;
                                            </button>
                                            <h4 class="modal-title" id="myModalLabe2">
                                                请说明不通过本App的原因。
                                            </h4>
                                        </div>
                                        <form method="post"  action="pass">
                                            <input type="hidden" id="nopassid" name="passid" value="">
                                            <input type="hidden" name="state" value="2">
                                            <div class="modal-body">
                                                <textarea style="width:100%;height:100%" name="verifyinfo">审核不通过。</textarea>
                                            </div>
                                            <div class="modal-footer">
                                                <button type="button" class="btn btn-default"
                                                        data-dismiss="modal">关闭
                                                </button>
                                                <button type="submit" class="btn btn-primary">
                                                    提交更改
                                                </button>
                                            </div>
                                        </form>
                                    </div><!-- /.modal-content -->
                                </div><!-- /.modal -->




                    </div> <!-- /widget-body -->
                </div> <!-- /widget -->
            </div> <!-- /row-fluid -->


            <!-- /Main window -->
        </div>
    </div><!--/.fluid-container-->
</div><!-- wrap ends-->
        </div>
<script type="text/javascript" src="/myapp/Public/assets/js/jquery.min.js"></script>
<script type="text/javascript" src="/myapp/Public/assets/js/jquery-ui.min.js"></script>
<script type="text/javascript" src="/myapp/Public/assets/js/raphael-min.js"></script>
<script type="text/javascript" src="/myapp/Public/assets/js/bootstrap.js"></script>
<script type="text/javascript" src='/myapp/Public/assets/js/sparkline.js'></script>
<script type="text/javascript" src='/myapp/Public/assets/js/morris.min.js'></script>
<script type="text/javascript" src="/myapp/Public/assets/js/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="/myapp/Public/assets/js/jquery.masonry.min.js"></script>
<script type="text/javascript" src="/myapp/Public/assets/js/jquery.imagesloaded.min.js"></script>
<script type="text/javascript" src="/myapp/Public/assets/js/jquery.facybox.js"></script>
<script type="text/javascript" src="/myapp/Public/assets/js/jquery.alertify.min.js"></script>
<script type="text/javascript" src="/myapp/Public/assets/js/jquery.knob.js"></script>
<script type='text/javascript' src='/myapp/Public/assets/js/fullcalendar.min.js'></script>
<script type='text/javascript' src='/myapp/Public/assets/js/jquery.gritter.min.js'></script>
<script type="text/javascript" src="/myapp/Public/assets/js/realm.js"></script>
        <script>
            $(document).ready(function() {
                $(".jq_link").click(function() {
                    var id = $(this).attr('rel');
                    $("#passid").val(id);
                    $("#passModal").modal();
                });


                $(".jq_linkno").click(function() {
                    var id = $(this).attr('rel');
                    $("#nopassid").val(id);
                    $("#nopassModal").modal();
                });
            });
        </script>
</body>
</html>